import { ModuleWithProviders, NgModule } from '@angular/core';
import { RouterModule } from '@angular/router';
import { CommonModule } from '@angular/common';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';

import { LoginComponent } from './components/login/login.component';
import { SidebarComponent } from './components/sidebar/sidebar.component';
// ngx-perfect-scrollbar
import { PerfectScrollbarModule } from 'ngx-perfect-scrollbar';

import { AlertComponent } from './components/alert/alert.component';

import { ModalMyModule } from './components/modal/modal-my.module';
import { ModalConfirmModule } from './components/modal-confirm/modal-confirm.module';

import { HeaderComponent } from './components/header/header.component';

@NgModule({
  declarations: [LoginComponent, SidebarComponent, AlertComponent, HeaderComponent],
  imports: [
    CommonModule,
    FormsModule,
    ReactiveFormsModule,
    RouterModule,
    PerfectScrollbarModule, //
  ],
  exports: [CommonModule, FormsModule, ReactiveFormsModule, ModalMyModule, ModalConfirmModule, SidebarComponent, HeaderComponent],
  entryComponents: [AlertComponent],
  providers: [],
})
export class SharedModule {
  static forRoot(): ModuleWithProviders {
    return {
      ngModule: SharedModule,
      providers: [],
    };
  }
}
